home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / garfield.swf / scripts / frame_30 / PlaceObject2_574_4 / CLIPACTIONRECORD onClipEvent(load).as
Encoding:
Text File  |  2010-04-12  |  1.5 KB  |  57 lines

  1. onClipEvent(load){
  2.    function light_up(c_name, global_pos)
  3.    {
  4.       if(global_pos > 0)
  5.       {
  6.          var i = 0;
  7.          while(i < country_ray.length)
  8.          {
  9.             eval(country_ray[i] + "_mov").gotoAndStop(1);
  10.             if(i != country_ray.length - 1)
  11.             {
  12.                eval(country_ray[i] + "_" + country_ray[i + 1])._visible = 0;
  13.             }
  14.             else
  15.             {
  16.                eval(country_ray[i] + "_" + country_ray[0])._visible = 0;
  17.             }
  18.             i++;
  19.          }
  20.          var i = 0;
  21.          while(i <= Math.floor(global_pos / 2800))
  22.          {
  23.             eval(country_ray[i] + "_mov").gotoAndStop(2);
  24.             if(i != country_ray.length)
  25.             {
  26.                eval(country_ray[i - 1] + "_" + country_ray[i])._visible = 1;
  27.             }
  28.             else
  29.             {
  30.                eval(country_ray[i - 1] + "_" + country_ray[0])._visible = 1;
  31.             }
  32.             i++;
  33.          }
  34.       }
  35.    }
  36.    var country_ray = new Array();
  37.    var i = _parent.offset_c;
  38.    while(i < _parent.offset_c + _parent.country_ray.length)
  39.    {
  40.       country_ray[i - _parent.offset_c] = _parent.country_ray[i % _parent.country_ray.length];
  41.       i++;
  42.    }
  43.    var i = 0;
  44.    while(i < country_ray.length)
  45.    {
  46.       if(i != country_ray.length - 1)
  47.       {
  48.          eval(country_ray[i] + "_" + country_ray[i + 1])._visible = 0;
  49.       }
  50.       else
  51.       {
  52.          eval(country_ray[i] + "_" + country_ray[0])._visible = 0;
  53.       }
  54.       i++;
  55.    }
  56. }
  57.